/**
 * author: abid.hussain
 */
exports.GATransactionsModel = Core.Class.subclass({
	classname : 'GATransactionsModel',
	initialize : function (){
	this.transactionId = 0;
	this.user_id= null;
	this.user_level= null;
	this.item_id= null;
	this.item_name= null;
	this.category_id= null;
	this.category_name= null;
	this.store_id= null;
	this.store_name= null;
	this.currency= null;
	this.price= null;
	this.price_bucket= null;
	this.ts= null;
	this.quantity= null;
	this.is_error = "0";
	this.state = "";
},
	setUserId : function (id){
		this.user_id = id;
	},
	setUserLevel : function (level){
		this.user_level = level;
	},
	setItemId : function (id){
		this.item_id = id;
	},
	setItemName : function (name){
		this.item_name = name;
	},
	setCategoryId : function (id){
		this.category_id = id;
	},
	setCategoryName : function (name){
		this.category_name = name;
	},
	setStoreId : function (id){
		this.store_id = id;
	},
	setStoreName : function (name){
		this.store_name = name;
	},
	setCurrency : function (curr){
		this.currency = curr;
	},
	setPrice : function (price){
		this.price = price;
	},
	setPriceBucket : function (bucket){
		this.price_bucket = bucket;
	},
	setTs : function (ts){
		this.ts = ts;
	},
	setQuantity : function (quantity){
		this.quantity = quantity;
	},
	setIsError : function (error){
		this.is_error = error;
	},
	getUserId : function (){
		return this.user_id;
	},
	getUserLevel : function (){
		return this.user_level;
	},
	getItemId : function (){
		return this.item_id;
	},
	getItemName : function (){
		return this.item_name;
	},
	getCategoryId : function (){
		return this.category_id;
	},
	getCategoryName : function (){
		return this.category_name;
	},
	getStoreId : function (){
		return this.store_id;
	},
	getStoreName : function (){
		return this.store_name;
	},
	getCurrency : function (){
		return this.currency ;
	},
	getPrice : function (){
		return this.price ;
	},
	getPriceBucket : function (){
		return this.price_bucket;
	},
	getTs : function (){
		return this.ts;
	},
	getQuantity : function (){
		return this.quantity;
	},
	getIsError : function (){
		return this.is_error;
	},
	toJSON: function() {
		var obj = {};
		for (var i in this) {
			if (i != "state") {
				obj[i] = this[i];
			}
		}
		return obj;
	},
	destroy: function(){
		this.transactionId =null;
		this.user_id= null;
		this.user_level= null;
		this.item_id= null;
		this.item_name= null;
		this.category_id= null;
		this.category_name= null;
		this.store_id= null;
		this.store_name= null;
		this.currency= null;
		this.price= null;
		this.price_bucket= null;
		this.ts= null;
		this.quantity= null;
		this.is_error =null;
		this.state =null;
	}
});